package base;

import java.util.Comparator;

/**
 * 
 * The ChromosomeComparator is used to compare between chromosomes.
 * 
 * The comparison is done by comparing the chromosom's fitness value.
 *
 */
public class ChromosomeComparator implements Comparator<Chromosome>{
	 
    @Override
    public int compare(Chromosome ch1, Chromosome ch2) {
        return Double.compare(ch1.get_fitness(),ch2.get_fitness()); 
    }
}
